package com.atlin.project.service;

import com.atlin.beaconsapicommon.model.domain.interfaceInfo.UserInterfaceInfo;
import com.atlin.project.model.dto.userInterfaceInfo.UserInterfaceInfoQueryRequest;
import com.atlin.project.model.vo.UserInterfaceInfoVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;

/**
 * @author atlin
 * @description userInterfaceInfo
 * @createDate date
 */
public interface UserInterfaceInfoService extends IService<UserInterfaceInfo> {


    /**
     * 调用接口统计
     *
     * @param interfaceInfoId
     * @param userId
     * @return
     */
    boolean invokeCount(long interfaceInfoId, long userId);

    /**
     * 初始化用户接口信息
     *
     * @param interfaceInfoId
     * @param userId
     * @return
     */
    UserInterfaceInfo initSysUserInterfaceInfo(long interfaceInfoId, long userId);
    
    


    void valid(UserInterfaceInfo userInterfaceInfo, boolean add);

    /**
     * 获取封装
     *
     * @param userInterfaceInfo
     * @param request
     * @return
     */
    UserInterfaceInfoVO getUserInterfaceInfoVO(UserInterfaceInfo userInterfaceInfo, HttpServletRequest request);


    /**
     * 获取查询条件
     *
     * @param questionQueryRequest
     * @return
     */
    QueryWrapper<UserInterfaceInfo> getQueryWrapper(UserInterfaceInfoQueryRequest questionQueryRequest);

    /**
     * 分页获取封装
     *
     * @param questionPage
     * @param request
     * @return
     */
    Page<UserInterfaceInfoVO> getUserInterfaceInfoVOPage(Page<UserInterfaceInfo> questionPage, HttpServletRequest request);
}
